import Vue from 'vue'
import Router from 'vue-router'
import Index from '@/page/Index'

Vue.use(Router);

export default new Router({
  // mode: 'history',
  routes: [
    {
      path:'/',
      component: Index,
      name:'首页'
    },
    // {
    //   path:'/comment',
    //   component:resolve => require(['@/page/comment/Index'],resolve),
    //   name:'评论管理',
    //   redirect:'/comment/list',
    //   children:[
    //     {
    //       path: 'list',
    //       component: resolve => require(['@/page/comment/List'],resolve)
    //     }
    //   ]
    // }
  ],
  scrollBehavior (to, from, savedPosition) {
    return {x:0,y:0}
    // return 期望滚动到哪个的位置
  }
})
